<!DOCTYPE html>
<html lang="zh-Hans">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    'use strict';
    let promiseObj = new Promise((resolve_, reject_) => {
        setTimeout(() => {
            console.log('setTimeout run');
            resolve_('OK!');
        }, 3000);
        console.log('Promise create');
        throw new Error('Error!');
    });
    promiseObj.catch((err_) => {
        console.warn('Catch err', err_);
    });
    promiseObj.then(
        (text_) => {
            console.log('Then 1 resolve', text_);
            return Promise.resolve('Then 1 resolve return');
        },
        (err_) => {
            console.warn('Then 1 reject', err_);
            return 'Then 1 reject return';
        }
    ).then(
        (text_) => {
            console.log('Then 2 resolve', text_);
        },
        (err_) => {
            console.warn('Then 2 reject', err_);
        }
    );
</script>
</body>
</html>